package com.zc.web.task;

import com.zc.web.service.ITodayPlanService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * ClassName:DailyStreakResetTask
 * Description:
 * DateTime: 2025/11/10 9:50
 * Author: zc
 * Version: 1.0
 */

@Slf4j
@Component("dailyStreakResetTask")
public class DailyStreakResetTask {
    @Autowired
    private ITodayPlanService todayPlanService;
    /**
     * 检查所有用户昨日计划完成情况
     */
    public void resetIncompleteUserStreaks() {
        log.info("开始重置用户当前连击数");
        todayPlanService.processYesterdayPlanCompletion();
    }
}
